<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>下拉菜单的制作</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<script>
			$(function() {
				$('#dg').datagrid({

					url: 'product.json',
					pageList:[3,6,9],
					toolbar: [
					{
						id:"save",
						text:"保存",
						iconCls: 'icon-save',
						handler: function() { alert('保存按钮') }
					}, '-',{
						id:"edit",
						text:"编辑",
						iconCls: 'icon-edit',
						handler: function() { alert('编辑按钮') }
					}, '-', {
						id:"help",
						text:"帮助",
						iconCls: 'icon-help',
						handler: function() { alert('帮助按钮') }
					}],

					columns: [
						[
							{ field: 'code', title: '代码', width: 100 },
							{ field: 'name', title: '名称', width: 100 },
							{ field: 'price', title: '价格', width: 100, align: 'right' }
						]
					]
				});
				$('#dg').datagrid('load', {

					name: 'easyui',
					address: 'ho'
				});
			})
		</script>
	</head>

	<body>
		<table id="dg"></table>

	</body>

</html>